import request from '@/utils/request'

export default {

  // 01 分页获取讲师列表
  getAll(id) {
    return request({
      url: `/eduService/chapter/list/${id}`,
      method: 'post'
    })
  },

  // 02 添加章节
  saveOne(chapter) {
    return request({
      url: `/eduService/chapter/save`,
      method: 'post',
      data: chapter
    })
  },

  // 03 删除单个
  deleteOne(id) {
    return request({
      url: `/eduService/chapter/delete/${id}`,
      method: 'post'
    })
  },

  // 04 删除全部
  deleteAll(courseId) {
    return request({
      url: `/eduService/chapter/delete/all/${courseId}`,
      method: 'post'
    })
  },

  // 05 更新
  updateOne(chapter){
    return request({
      url: `/eduService/chapter/update`,
      method: 'post',
      data: chapter
    })
  },
  // 03 删除单个
  deleteVideo(chapterId) {
    return request({
      url: `/eduService/chapter/vod/deleteOne/${chapterId}`,
      method: 'post'
    })
  },


}



